<template>
	<swiper>
		<swiper-item v-for="(item,i) in swiperData" :key="i">
			<image :src="item.url" mode="widthFix" style="width:100%"></image>
		</swiper-item>
	</swiper>
	<view style="width:690rpx;hright:200rpx;margin:30rpx auto;border-radius:30rpx;font-size:80rpx;text-align:center;line-height:200rpx;background:#ccc;" @click="togoods">
		海量商品
	</view>
	<!-- <view style="width:690rpx;hright:200rpx;margin:30rpx auto;border-radius:30rpx;font-size:80rpx;text-align:center;line-height:200rpx;background:#ccc;" @click="tocategory">
		商品分类
	</view> -->
	<!-- <view style="width:690rpx;hright:200rpx;margin:30rpx auto;border-radius:30rpx;font-size:80rpx;text-align:center;line-height:200rpx;background:#ccc;" @click="toaddress">
		用户地址
	</view>
	<view style="width:690rpx;hright:200rpx;margin:30rpx auto;border-radius:30rpx;font-size:80rpx;text-align:center;line-height:200rpx;background:#ccc;" @click="toOrder">
		商品订单
	</view> -->
	<!-- <view style="width:690rpx;hright:200rpx;margin:30rpx auto;border-radius:30rpx;font-size:80rpx;text-align:center;line-height:200rpx;background:#ccc;" @click="toCart">
		购物车
	</view> -->
</template>

<script setup>
	import {ref} from 'vue'
	import http from '../components/http.js'
	const swiperData = ref()
	http.http({url:'/lbt/queryAll',method:'GET'}).then(res=>{
		console.log(res)
		swiperData.value = res.data.data
	})
	function togoods(){
		uni.navigateTo({
			url:'goods'
		})
	}
	function tocategory(){
		uni.navigateTo({
			url:'category'
		})
	}
	function toaddress(){
		uni.navigateTo({
			url:'address'
		})
	}
	function toOrder(){
		uni.navigateTo({
			url:'order'
		})
	}
	function toCart(){
		uni.navigateTo({
			url:'cart'
		})
	}
</script>

<style>
</style>